]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
shellEntry: Disable copy action for password entries
authorFlorian Müllner <fmuellner@gnome.org>
Mon, 4 Mar 2013 15:22:16 +0000 (16:22 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Mon, 4 Mar 2013 15:43:59 +0000 (16:43 +0100)
Curently it is possible to copy the content of password entries,
and paste it elsewhere in clear text. This is undesirable, so
follow GTK+'s behavior and disable the copy action for password
entries.

https://bugzilla.gnome.org/show_bug.cgi?id=695104

js/ui/shellEntry.js

index b71c809f15c8a26a8ca1935bd06e93750d2dc7f1..61e43a9e3ee4cb742cadc0fc6cbb4ff529468cf7 100644 (file)
@@ -89,7 +89,8 @@ const EntryMenu = new Lang.Class({
 
     _updateCopyItem: function() {
         let selection = this._entry.clutter_text.get_selection();
-        this._copyItem.setSensitive(selection && selection != '');
+        this._copyItem.setSensitive(!this._entry.clutter_text.password_char &&
+                                    selection && selection != '');
     },
 
     _updatePasteItem: function() {